package com.study.aop.AspectJAop.基于xml;


import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author chenhs
 * @date 2019/9/25
 */
public class Test {
	@org.junit.Test
	public  void demo(){
		String xmlPath= "com/study/aop/AspectJAop/基于xml/applicationContext.xml";
		ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);
		/*转型为接口*/
		IUserService userServe = applicationContext.getBean("targetId", IUserService.class);
		userServe.addUser();
		/*测试异常放开*/
		userServe.updateUser();
		userServe.deleteUser();
	}
}
